package com.edooschool.oral.arithmetic.service;

import java.util.List;

import com.edooschool.entity.oral.OralAnswerRecord;
import com.edooschool.entity.oral.OralQuestion;
import com.edooschool.entity.oral.OralRound;
import com.edooschool.oral.arithmetic.entity.OralRoundResult;

/**
 * 
 * @author mohanlan
 *
 */
public interface OralService {
    
    /**
     * 
     * @return
     */
    public int countUser();
    
    /**
     * 
     * @return
     */
    public int countRecord();
    
    /**
     * 
     * @return
     */
    public int countShare();
    
    /**
     * 
     * @param id
     * @return
     */
    public OralRound loadOralRound(Long id);
    
    /**
     * 
     * @param groupId
     * @return
     */
    public List<OralRound> listOralRound(Long groupId);
    
    /**
     * 
     * @param id
     * @return
     */
    public OralAnswerRecord loadOralAnswerRecord(Long id);
    
    /**
     * 
     * @param oralRound
     * @return
     */
    public List<OralQuestion> listQralQuestion(OralRound oralRound);
    
    /**
     * 
     * @param round
     * @param oralRoundResult
     * @param openid
     * @return
     */
    public OralAnswerRecord saveOralAnswer(OralRound round, OralRoundResult oralRoundResult, String openid);
    
    /**
     * 
     * @param openid
     * @param roundId
     * @param url
     * @param marks
     * @param type
     */
    public void shareOralArithmetic(String openid, Long roundId, String url, String marks, String type);
    
    /**
     * 
     * @param openid
     * @return
     */
    public List<OralAnswerRecord> listOralAnswerRecord(String openid);
    
    /**
     * 
     * @param openid
     * @param roundId
     * @return
     */
    public List<OralAnswerRecord> listOralAnswerRecord(String openid, Long roundId);
}
